home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\PROTO\HOOK.H < prev    next >
C/C++ Source or Header  |  1994-12-29  |  4KB  |  148 lines

  1. /*
  2.  * hook.h.proto: header for hook.c
  3.  * 
  4.  * Generated from hook.h.proto by source/Makefile
  5.  *
  6.  * @(#)$Id: hook.h.proto,v 1.10 1994/10/16 01:29:14 mrg Stab $
  7.  */
  8.  
  9. #ifndef __hook_h_
  10. # define __hook_h_
  11.  
  12. /* Hook: The structure of the entries of the hook functions lists */
  13. typedef struct    hook_stru
  14. {
  15.     struct    hook_stru *next;    /* pointer to next element in list */
  16.     char    *nick;            /* The Nickname */
  17.     int    not;            /* If true, this entry should be
  18.                      * ignored when matched, otherwise it
  19.                      * is a normal entry */
  20.     int    noisy;            /* flag indicating how much output
  21.                      * should be given */
  22.     int    server;            /* the server in which this hook
  23.                      * applies. (-1 if none). If bit 0x1000
  24.                      * is set, then no other hooks are
  25.                      * tried in the given server if all the
  26.                      * server specific ones fail
  27.                      */
  28.     int    sernum;            /* The serial number for this hook. This
  29.                      * is used for hooks which will be
  30.                      * concurrent with others of the same
  31.                      * pattern. The default is 0, which
  32.                      * means, of course, no special
  33.                      * behaviour. If any 1 hook suppresses
  34.                      * the * default output, output will be
  35.                      * suppressed.
  36.                      */
  37.     char    *stuff;            /* The this that gets done */
  38.     int    global;            /* set if loaded from `global' */
  39. }    Hook;
  40.  
  41. /* HookFunc: A little structure to keep track of the various hook functions */
  42. typedef struct
  43. {
  44.     char    *name;            /* name of the function */
  45.     Hook    *list;            /* pointer to head of the list for this
  46.                      * function */
  47.     int    params;            /* number of parameters expected */
  48.     int    mark;
  49.     unsigned flags;
  50. }    HookFunc;
  51.  
  52. /*
  53.  * NumericList: a special list type to dynamically handle numeric hook
  54.  * requests 
  55.  */
  56. typedef struct numericlist_stru
  57. {
  58.     struct    numericlist_stru *next;
  59.     char    *name;
  60.     Hook    *list;
  61. }    NumericList;
  62.  
  63. #define    ACTION_LIST $
  64. #define    CHANNEL_NICK_LIST $
  65. #define CHANNEL_SIGNOFF_LIST $
  66. #define CONNECT_LIST $
  67. #define CTCP_LIST $
  68. #define CTCP_REPLY_LIST $
  69. #define    DCC_CHAT_LIST $
  70. #define DCC_CONNECT_LIST $
  71. #define DCC_ERROR_LIST $
  72. #define DCC_LOST_LIST $
  73. #define    DCC_RAW_LIST $
  74. #define DCC_REQUEST_LIST $
  75. #define DISCONNECT_LIST $
  76. #define ENCRYPTED_NOTICE_LIST $
  77. #define ENCRYPTED_PRIVMSG_LIST $
  78. #define EXEC_LIST $
  79. #define EXEC_ERRORS_LIST $
  80. #define EXEC_EXIT_LIST $
  81. #define EXEC_PROMPT_LIST $
  82. #define EXIT_LIST $
  83. #define FLOOD_LIST $
  84. #define HELP_LIST $
  85. #define    HOOK_LIST $
  86. #define IDLE_LIST $
  87. #define INPUT_LIST $
  88. #define INVITE_LIST $
  89. #define JOIN_LIST $
  90. #define LEAVE_LIST $
  91. #define LIST_LIST $
  92. #define MAIL_LIST $
  93. #define MODE_LIST $
  94. #define MSG_LIST $
  95. #define MSG_GROUP_LIST $
  96. #define NAMES_LIST $
  97. #define NICKNAME_LIST $
  98. #define NOTE_LIST $
  99. #define NOTICE_LIST $
  100. #define NOTIFY_SIGNOFF_LIST $
  101. #define NOTIFY_SIGNON_LIST $
  102. #define PUBLIC_LIST $
  103. #define PUBLIC_MSG_LIST $
  104. #define PUBLIC_NOTICE_LIST $
  105. #define PUBLIC_OTHER_LIST $
  106. #define    RAW_IRC_LIST $
  107. #define    SEND_ACTION_LIST $
  108. #define    SEND_DCC_CHAT_LIST $
  109. #define SEND_MSG_LIST $
  110. #define SEND_NOTICE_LIST $
  111. #define SEND_PUBLIC_LIST $
  112. #define    SEND_TALK_LIST $
  113. #define    SERVER_NOTICE_LIST $
  114. #define SIGNOFF_LIST $
  115. #define    TALK_LIST $
  116. #define TIMER_LIST $
  117. #define TOPIC_LIST $
  118. #define WALL_LIST $
  119. #define WALLOP_LIST $
  120. #define WHO_LIST $
  121. #define WIDELIST_LIST $
  122. #define WINDOW_LIST $
  123. #define WINDOW_KILL_LIST $
  124. #define KICK_LIST $
  125.  
  126. #ifdef ON_KICK
  127. # define NUMBER_OF_LISTS KICK_LIST + 1
  128. #else
  129. # define NUMBER_OF_LISTS WINDOW_KILL_LIST + 1
  130. #endif 
  131.  
  132. #ifdef USE_STDARG_H
  133. extern    int    do_hook(int, char *, ...);
  134. #else
  135. extern    int    do_hook();
  136. #endif
  137. extern    void    save_hooks();
  138. extern    char    *hook_info;
  139. extern    void    remove_hook();
  140. extern    void    show_hook();
  141.  
  142. extern    NumericList *numeric_list;
  143. extern    HookFunc FAR hook_functions[];
  144.  
  145. extern    int    in_on_who;
  146.  
  147. #endif /* __hook_h_ */
  148.